<?php

class TimeOut
{
    public $out;
    public $idle;

    function __construct()
    {
        switch (func_num_args()) {
            case 1:
                $this->idle = func_get_arg(0);
                $this->out  = $this->idle;
                break;

            case 2:
                $this->idle = func_get_arg(0);
                $this->out  = func_get_arg(1);
                break;

            default:
                throw new Exception();
        }
    }
}

function TimeOut()
{
    switch (func_num_args()) {
        case 1:
            $param1 = func_get_arg(0);
            return new TimeOut($param1);
            break;

        case 2:
            $param1 = func_get_arg(0);
            $param2 = func_get_arg(1);
            return new TimeOut($param1, $param2);
            break;

        default:
            throw new Exception();
    }

}

?>